﻿/*
    CMS分页按钮
*/

CKEDITOR.plugins.add('MultilFileUpLoad',
{
    requires: ['iframedialog'],
    init: function (editor) {
//        var pluginCommandName = "MultilFileUpLoad_Command";
//        CKEDITOR.dialog.addIframe('MultilFileUpLoad_dialog',
//                                   '批量上传',
//                                   this.path + 'SWFUpload/Default.aspx',
//                                   500,
//                                   500,
//                                   function () { /*oniframeload*/ }
//                                   );

//        //CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/MultilFileUpLoadDialog.js');
//        editor.addCommand(pluginCommandName, {
//            exec: function (e) {
//                e.openDialog('MultilFileUpLoad_dialog');
//                //e. insertHtml(l)
//                CKEDITOR.dialog.getCurrent();
//            }
//        });
//        editor.ui.addButton('MultilFileUpLoad', {
//            label: '多文件上传',
//            command: pluginCommandName,
//            icon: this.path + 'dialogs/MultilFileUpLoad.gif'
//        });

                var pluginName = "MultilFileUpLoad";
                CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/MultilFileUpLoadDialog.js');
                editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
                editor.ui.addButton(pluginName,
        			{
        			    label: "多文件上传",
        			    command: pluginName,
        			    icon: this.path + 'dialogs/MultilFileUpLoad.gif'
        			});
        CKEDITOR.dialog.add('about', this.path + 'dialogs/about.js');
    }
});